  
namespace eval ::Tadius {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list "20229 19129 11836 20542 17197 19702"
        set spellid [ ::AI::Check $npc $victim 18116 ]
        # Anti-Stun
        if { $mobh >= 1 && $mobh <= 100 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28299 ]
        }
        if { $mobh >= 30 && $mobh <= 80 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28293 ]
        }
        if { $mobh >= 20 && $mobh <= 70 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28085 28059 ]
        }
        if { $mobh >= 10 && $mobh <= 20 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28099 ]
                  }
                if { $mobh >= 1 && $mobh <= 5 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28498 ]
                }
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}

namespace eval ::Patchwerk {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list "28308 22595 22478 22686 10420"
        set spellid [ ::AI::Check $npc $victim 18116 ]
        if { $mobh <= 5 && $mobh <= 100 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28308 ]
                }
         if { $mobh >= 5 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28747 ]
                }
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}

namespace eval ::Grablous {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list "24838 26140 10887"
        set spellid [ ::AI::Check $npc $victim 18116 ]
        # Anti-Stun
        if { $mobh >= 60 && $mobh <= 90 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 10887 ]
        }
        if { $mobh >= 1 && $mobh <= 70 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28137 ]
        }
        if { $mobh >= 20 && $mobh <= 90 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28206 ]
                }
        if { $mobh >= 1 && $mobh <= 30 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28747 ]
                }
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}

namespace eval ::Glus {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list "28407 28311 28241"
        set spellid [ ::AI::Check $npc $victim 18116 ]
        # Anti-Stun
        if { $mobh >= 30 && $mobh <= 100 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 29685 ]
        }
        if { $mobh >= 1 && $mobh <= 100 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28405 ]
        }
        if { $mobh >= 1 && $mobh <= 35 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28374 ]
                  }
                if { $mobh >= 1 && $mobh <= 30 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28798 ]
                }
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}


namespace eval ::Fallina {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list "20229 19129 11836 20542 17197 19702"
        set spellid [ ::AI::Check $npc $victim 18116 ]
        # Anti-Stun
        if { $mobh >= 30 && $mobh <= 100 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 29169 ]
        }
        if { $mobh >= 20 && $mobh <= 80 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28794 ]
        }
        if { $mobh >= 1 && $mobh <= 35 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 29484 ]
                  }
                if { $mobh >= 1 && $mobh <= 30 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28798 ]
                }
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}


namespace eval ::Maxna {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list " 28621  20542 17197  20677 29211"
        set spellid [ ::AI::Check $npc $victim 28621 ]
        # 
        if { $mobh >= 30 && $mobh <= 100 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28621 ]
        }
        if { $mobh >= 20 && $mobh <= 80 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28741 ]
        }
        if { $mobh >= 1 && $mobh <= 35 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 29484 ]
                  }
                if { $mobh >= 1 && $mobh <= 30 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 28131 ]
                }
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}

namespace eval ::Rajubias {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list "29107"
        set spellid [ ::AI::Check $npc $victim 18116 ]
        if { $mobh >= 30 && $mobh <= 90 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 19820 ]
            # Mind Flay
        }        
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}

namespace eval ::NaxNos {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list " 19129  20542 17197  20677 29211"
        set spellid [ ::AI::Check $npc $victim 18116 ]
        # Anti-Stun
        if { $mobh >= 20 && $mobh <= 100 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 29267 9268 29269 29238 ]
        }
        if { $mobh >= 30 && $mobh <= 80 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 29211 ]
        }
        if { $mobh >= 60 && $mobh <= 70 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 24838 ]
        }
        if { $mobh >= 10 && $mobh <= 20 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 29213 ]
                  }
                if { $mobh >= 1 && $mobh <= 10 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 29214 ]
                }
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}

namespace eval ::Heygun {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list "20229 19129 11836 20542 17197 19702 22709"
        set spellid [ ::AI::Check $npc $victim 18116 ]
        if { $mobh >= 30 && $mobh <= 90 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 22709 ]
            # Mind Flay
        }
                
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}

namespace eval ::Kosaz {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list "20229 19129 11836 20542 17197 19702 20228"
        set spellid [ ::AI::Check $npc $victim 18116 ]
        if { $mobh >= 30 && $mobh <= 90 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 20228 ]
            # Mind Flay
        }
                
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}

namespace eval ::Mograin {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list "20229 19129 11836 20542 17197 19702 15708"
        set spellid [ ::AI::Check $npc $victim 18116 ]
        if { $mobh >= 30 && $mobh <= 90 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 15708 ]
            # Mind Flay
        }
                
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}

namespace eval ::Palriark {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list "20229 19129 11836 20542 17197 19702 19630 22433"
        set spellid [ ::AI::Check $npc $victim 18116 ]
        if { $mobh >= 30 && $mobh <= 90 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 22433 ]
            # Mind Flay
        }
                
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}

namespace eval ::Blomer {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list "20229 19129 11836 20542 17197 19702 20690"
        set spellid [ ::AI::Check $npc $victim 18116 ]
        if { $mobh >= 30 && $mobh <= 90 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 20690 ]
            # Mind Flay
        }
                
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}

namespace eval ::Arubrecan {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list "28785 28786 "
          #  not spell dbc fix 29104 29103 28783 Corpse Scarabs(?)
        set spellid [ ::AI::Check $npc $victim 18116 ]
        if { $mobh >= 30 && $mobh <= 90 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 19702 ]
            # Mind Flay
        }
                
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}

namespace eval ::loateb {
    proc CanCast { npc victim } {
        set mobh [ ::GetHealthPCT $npc ]
        set spell_list "20229 19129 11836 20542 17197 19702 19771 23313"
        set spellid [ ::AI::Check $npc $victim 18116 ]
        if { $mobh >= 30 && $mobh <= 90 && $spellid == 0 } {
            set spellid [ ::AI::Check $npc $victim 19702 ]
            # Mind Flay
        }
                
        if { $spellid == 0 } {
            set spellid [ lindex $spell_list [ expr { int( rand() * [ llength $spell_list ] ) } ] ]
        }
        return [ ::AI::Cast $npc $victim $spellid ]
    }
}


